package com.itheima.reggie.mapper;

import com.itheima.reggie.entity.Setmeal;
import com.itheima.reggie.entity.SetmealDish;
import org.apache.ibatis.annotations.*;
import org.apache.ibatis.annotations.Param;

import java.util.List;

public interface SetmealDishMapper {


    void batchSave(@Param("setmealDishList") List<SetmealDish> setmealDishList);

    void deleteBySetmealIds(@Param("ids") List<Long> ids);

    @Delete("delete from setmeal_dish where id = #{id}")
    void deleteBySetmealId(@Param("id") Long id);

    @Select("select * from setmeal_dish where setmeal_id = #{setmealId}")
    List<SetmealDish> findBySetmealId(Long setmealId);


    int findCount(@Param("ids") List<Long> ids);
}
